<?php 
use lib\Auth;
$cookie = input("cookie");
$auth = new Auth($password_hash);

// 管理员登录验证
$admin_auth = $auth->validateAdminLogin($cookie["admin_token"] ?? null);
$islogin_admin = $admin_auth['status'];
$adminrow = $admin_auth['data'];


// 用户登录验证
$user_auth = $auth->validateUserLogin($cookie["user_token"] ?? null);
$islogin_user = $user_auth['status'];
$userrow = $user_auth['data'];
$user_uid = $islogin_user == 1 ? $userrow['pid'] : null;

?>